<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/16
 * Time: 10:40
 */

include_once '../tools/DbTools.php';

DbTools::InitDb();
$sql = 'select * from AccountInfo';
$result = DbTools::select($sql);
if(empty($result)){
    echo '未查询到数据'.'<a href="originalPage.php">回到管理员操作页面</a>';
}
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<table cellpadding="10" border="1" cellspacing="0">
    <tr>
        <th>序号</th>
        <th>户头账号</th>
        <th>电话</th>
        <th>真实姓名</th>
        <th>开户日期</th>
    </tr>
    <?php
    foreach ($result as $key => $item){
        ?>
        <tr>
            <td><?php echo $key+1;?></td>
            <td><?php echo $item['AccountCode'];?></td>
            <td><?php echo $item['AccountPhone'];?></td>
            <td><?php echo $item['RealName'];?></td>
            <td><?php echo $item['OpenTime'];?></td>

        </tr>
        <?php
    }
    ?>
</table>
<button><a href="originalPage.php">回到操作界面</a></button>
</body>
</html>